package com.neusoft.elmboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.neusoft.elmboot.po.Business;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface BusinessMapper extends BaseMapper<Business> {
//
//    @Select("select * from business")
//    List<Business> queryBusiness();


    /**
     *
     * @param orderTypeId
     * @return
     */
    @Select("select * from business where orderTypeId=#{orderTypeId} order by businessId") //#{} 是 MyBatis 的参数占位符 生成预编译sql语句
                                                                                            //{}里面是属姓名
    List<Business> listBusinessByOrderTypeId(Integer orderTypeId);

    @Select("select * from business where businessId=#{businessId}")
    Business getBusinessById(Integer businessId);
}